<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			window.onload=function(){
				//抓元素
				var span=document.getElementById("title").getElementsByTagName('span')[0];
				setInterval(function(){
					//获得当前值
					var old_num=span.innerHTML;
					//获得新值
					var new_num=old_num-1;
					//将新值赋值回去
					span.innerHTML=new_num;
					if(new_num==1){
						location.assign('http://taobao.com');
					}
				},1000)
			}
		</script>
	</head>
	<body>
		<h1 id='title'>亲，页面没找到，<span>5</span>秒后跳回淘宝首页</h1>
	</body>
</html>
